-
-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix[venom]: fix _stack_reorder()
routine
#4220
fix[venom]: fix _stack_reorder()
routine
#4220
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4220 +/- ##
==========================================
- Coverage 91.36% 89.02% -2.35%
==========================================
Files 108 108
Lines 15637 15655 +18
Branches 3440 3445 +5
==========================================
- Hits 14287 13937 -350
- Misses 920 1213 +293
- Partials 430 505 +75
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
vyper/venom/venom_to_assembly.py
Outdated
cost += self.swap(assembly, stack, depth) | ||
if final_stack_depth in positions[stack.peek(final_stack_depth)]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the positions[stack.peek(final_stack_depth)]
can be factored out into a variable
_stack_reorder()
routine
What I did
Fixed the issue that was manifested in the snekmate test. This bug is reported in #4215
How I did it
The bug was caused by error in
stack_reorder
function. The function depends on the order of each operand but since the order changes there is the possibility to move same stack operand twice. To fix this issue I kept the information where necessary operands on stack.How to verify it
The example from the issue does compile now.
Commit message
Description for the changelog
Cute Animal Picture